//
//  HJHSearchView.swift
//  Weibo
//
//  Created by 黄健桦 on 2016/9/23.
//  Copyright © 2016年 黄健桦. All rights reserved.
//

import UIKit

class HJHSearchView: UIButton {
    
//    @IBInspectable var cornerRadius: CGFloat = 0.0

    class func loadSearchView() -> HJHSearchView{
        
        let nib = UINib(nibName: "HJHSearchView", bundle: nil)
        
        let searchView = nib.instantiate(withOwner: nil, options: nil).last as! HJHSearchView
        
        return searchView
        
    }

    override func awakeFromNib() {
        
        self.imageEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 0)
        
        self.titleEdgeInsets = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 0)
        
        self.bounds.size.width = UIScreen.main.bounds.width
        
        self.layer.cornerRadius = 17
        
        
    }
}
